﻿using Framework.Common.Enums;

namespace Framework.Common.Attributes
{
    /// <summary>
    /// 自动注入实例
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class InjectionAttribute : Attribute
    {
        /// <summary>
        /// 自动注入实例
        /// </summary>
        /// <param name="type"></param>
        public InjectionAttribute(InjectionTypeEnum type = InjectionTypeEnum.Scoped)
        {
            InjectionType = type;
        }

        /// <summary>
        /// 生存周期
        /// </summary>
        public InjectionTypeEnum InjectionType;
    }
}
